package com.lwbldy.modules.system.service;

import com.lwbldy.modules.system.domain.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 系统用户
 * 
 * @author lwbldy
 * @email lwbldy@163.com 
 * @date 2019-03-27 10:59:07
 */
public interface SysUserService {
	
	SysUser queryById(Long userId);

    SysUser queryByName(String userName);
	
	List<SysUser> queryList(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	
	int save(SysUser sysUser);

    int save(List<SysUser> list);

    int update(SysUser sysUser);

    /**
     * 更新数据和权限
     * @param sysUser
     * @return
     */
    int updateUserAndRole(SysUser sysUser);

    int remove(Long userId);

    int removeBatch(Long[] ids);

    /**
     * 查询用户的所有权限
     * @param userId  用户ID
     */
    List<String> queryAllPerms(Long userId);

    /**
     * 修改用户密码
     * @param userId
     * @param pwd
     * @return
     */
    int changePWD(Long userId,String pwd);
}
